package com.woniuxy.rabbitmqspringboot.simple;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author zhangyong
 * @Date 2021/8/12 0012上午 11:41
 */
@Component
public class SimpleConsumer {
    //通过注解监听消息队列
    @RabbitListener(queues = "boot_simple_work")
    public void consumer(String data){
        System.out.println(data);
    }
}
